<input type="hidden" id="change_password_status" value="<?php echo $this->session->flashdata('change_password_status'); ?>" />
<script type="text/javascript">
  $(document).ready(function() {
    var change_password_status = $.trim($('#change_password_status').val());
    if (change_password_status == 1) {
      toastr.success('Successfully changed your password !');
      return false;
    }
    if (change_password_status == 2) {
      toastr.error('Invalid current password !');
      return false;
    }
    if (change_password_status == 3) {
      toastr.error('Error occured !');
      return false;
    }
  });
</script>

<div class="page" style="min-height: 500px;">
  <div class="page-container">
    <div class="container">
      <div class="row">
        <div class="span3">
          <h4>Settings</h4>
          <div class="sidebar">
            <ul class="col-nav span3">
              <li><a href="<?php echo base_url('settings/profile'); ?>"><i class="pull-right"></i>Profile</a></li>
              <li><a href="<?php echo base_url('settings/photo'); ?>"><i class="pull-right"></i>Photo</a></li>
              <li style="background-color: #EEE; outline: solid #CCC 1px;"><a href="<?php echo base_url('settings/password'); ?>"><i class="pull-right"></i>Password</a></li>
              <li><a href="<?php echo base_url('settings/others'); ?>"><i class="pull-right"></i>Others</a></li>
            </ul>
          </div>
        </div>
        <div class="span9">
          <h4 class="header">Change password</h4>
          <form class="form-horizontal" method="post" action="<?php echo base_url('settings/password'); ?>" onsubmit="return confirm_action('Are you sure to change your password ?');">
            <input type="hidden" name="csrf_token" value="<?php echo set_csrf_token(); ?>"/>
            <div class="control-group">
              <label for="inputCurrentPassword" class="control-label">Current Password </label>
              <div class="controls">
                <input id="current_password" name="current_password" type="password" placeholder="Current Password"/>
              </div>
            </div>
            <div class="control-group">
              <label for="inputPassword" class="control-label">New Password </label>
              <div class="controls">
                <input id="new_password" name="new_password" type="password" placeholder="New Password"/>
              </div>
            </div>
            <div class="control-group">
              <label for="inputPasswordAgain" class="control-label">Confirm Password</label>
              <div class="controls">
                <input id="confirm_new_password" name="confirm_new_password" type="password" placeholder="Confirm New Password"/>
              </div>
            </div>
            <div class="control-group"> 
              <div class="controls">
                <button type="submit" class="btn" onclick="return validate_change_password();">Save Changes</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>